package 面向对象思考;

public class RectangleFromSimpleGeometricObject{
	
	private double width;
	private double height;
	
	public RectangleFromSimpleGeometricObject(double w, double h) {
		this.width = w;
		this.height = h;
	}
	
	public double area() {
		return this.width * this.height;
	}
	
	public double diameter() {
		return 2 * (this.width + this.height);
	}
}
